package maps;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;

public class CollectionDemo {
	public static void main(String[] args) {
		List<String> list = new LinkedList<>();
		list.add("1");
		list.add("hello");
		list.add("1");//ssds
		//list.remove(2);
		for(String s:list) {
			System.out.println(s);
		}
		System.out.println("==================");
		list.add(1,"world");
		Iterator<String> itr = list.iterator();
		while(itr.hasNext()) {
			String s = itr.next();
			System.out.println(s);
		}
		
		list.clear();
		System.out.println(list);
		
		
	}
}
